package com.mianyang.zhangsan.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

import com.mianyang.zhangsan.common.util.StringUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author jiangjr
 * @since 2022-10-23
 */
@Data
@Builder
@TableName("sec_account")
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "SecAccount对象", description = "")
public class SecAccount implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户编号")
    @TableId(value = "account_id", type = IdType.AUTO)
    private Long accountId;

    @ApiModelProperty("用户账号")
    private String accountName;

    @ApiModelProperty("用户密码")
    private String accountWord;

    @ApiModelProperty("头像地址")
    private String avatar;

    @ApiModelProperty("签名")
    private String signature;

    @ApiModelProperty("用户等级")
    private Integer accountLevel;

    @ApiModelProperty("用户职位")
    private Integer accountPositon;

    @ApiModelProperty("用户学习时长")
    private Integer stadyTime;

    @ApiModelProperty("用户身份认证")
    private String identityId;

    @ApiModelProperty("用户上级")
    private Long parentId;

    @ApiModelProperty("用户部门")
    private Long deptId;

    private String deptName;

    @ApiModelProperty("用户注册时间")
    private Date registerTime;


    public boolean checkRegister() {
        return StringUtils.isNotEmpty(accountName) && StringUtils.isNotEmpty(accountWord);
    }


}
